package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IForwardOrderActivityModel;
import com.wgts.wgts.mvp.model.imp.ForwardOrderActivityModel;
import com.wgts.wgts.mvp.presenter.IForwardOrderActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.ForwardOrderActivityPresenter;
import com.wgts.wgts.mvp.view.IForwardOrderActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

@Module
public class ForwardOrderActivityModule {

    private IForwardOrderActivityView view;

    public ForwardOrderActivityModule(IForwardOrderActivityView view) {
        this.view = view;
    }

    @Provides
    @ActivityScope
    public IForwardOrderActivityView provideView(){
        return view;
    }

    @Provides
    @ActivityScope
    public IForwardOrderActivityModel provideModel(NetService netService){
        return new ForwardOrderActivityModel(netService);
    }

    @Provides
    @ActivityScope
    public IForwardOrderActivityPresenter providePresenter(IForwardOrderActivityView view, IForwardOrderActivityModel model){
        return new ForwardOrderActivityPresenter(model, view);
    }
}
